package com.example.demo.component;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-10-09
 * Time: 15:47
 */


@Controller
//能将数据返回的 只有Controller注解 是连接前后端的注解
public class UserComponent {

    @ResponseBody
    @RequestMapping("/sa")
    public String say(){
        return "hello 检验一下不是Controller注解 能否被访问";
    }
}
